﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>用户注册 - 安阳师范网购系统！</title>
		<meta name="description" content="久零网一个O2O购物平台。平台以刚性需求为主，结合当地衣食住行玩乐购的大型联盟商家，用买一赠一的方式进行，消费者在久零网及地面店购物购买多少即送等值的代金券，代金券在联盟商家可以一比一等同人民币使用。" />
		<meta name="keywords" content="久零网，宁夏O2O，宁夏久零网" />

		<link type="text/css" href="<%=basePath%>/mallstyle/css/header.css" rel="stylesheet" />
		<link type="text/css" href="<%=basePath%>/mallstyle/css/main.css" rel="stylesheet" />
		<link type="text/css" href="<%=basePath%>/mallstyle/css/footer.css" rel="stylesheet" />
		<link type="text/css" href="<%=basePath%>/mallstyle/css/qq.css" rel="stylesheet" />
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/index.js"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/jquery.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/common.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/cart.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/main.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/qq.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/kissy.js"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/switchable-pkg.js"></script>
		<!--[if lte IE 6]>
<script type="text/javascript" language="Javascript" src="<%=basePath%>/mallstyle/js/hoverforie6.js"></script>
<![endif]-->

		<script type="text/javascript">
			//<!CDATA[
			var SITE_URL = "http://www.999000.cn";
			var REAL_SITE_URL = "http://www.999000.cn";
			var PRICE_FORMAT = '¥%s';
			//]]>
		</script>

		<script charset="utf-8" type="text/javascript" src="<%=basePath%>/mallstyle/js/jquery.validate.js"></script>
		<script charset="utf-8" type="text/javascript" src="<%=basePath%>/mallstyle/js/jquery.poshytip.js"></script>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/mallstyle/css/tip-yellowsimple.css" />
		<!--<editmode></editmode>-->

		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "//hm.baidu.com/hm.js?dcaa35200cee94d622f4315114994082";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();
		</script>

	</head>

	<body>
		<%@include file="../../../nav.jsp"%>
		<link type="text/css" href="<%=basePath%>/mallstyle/css/dialog.css" rel="stylesheet" />
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/dialog.js" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				jQuery.validator.addMethod("telphoneValid", function(value, element) {
					var tel = /^1[34578]{1}\d{9}$/;
					return tel.test(value) || this.optional(element);
				}, "请输入正确的手机号码");

				$('#register_form').validate({
					errorPlacement: function(error, element) {
						var error_td = element.parent('dd');
						error_td.find('label').hide();
						error_td.append(error);
					},
					success: function(label) {
						label.addClass('validate_right').text('OK!');
					},
					onkeyup: false,
					rules: {
						user_name: {
							required: true,
							byteRange: [11, 11, 'utf-8'],
							telphoneValid: true,
							remote: {
								url: 'index.php?app=member&act=check_user&ajax=1',
								type: 'get',
								data: {
									user_name: function() {
										return $('#user_name').val();
									}
								},
								beforeSend: function() {
									var _checking = $('#checking_user');
									_checking.prev('.field_notice').hide();
									_checking.next('label').hide();
									$(_checking).show();
								},
								complete: function() {
									$('#checking_user').hide();
								}
							}
						},
						check_code: {
							required: true,
							digits: true,
							minlength: 6
						},
						captcha: {
							required: true,
							remote: {
								url: 'index.php?app=captcha&act=check_captcha',
								type: 'get',
								data: {
									captcha: function() {
										return $('#captcha1').val();
									}
								}
							}
						},
						password: {
							required: true,
							minlength: 6
						},
						password_confirm: {
							required: true,
							equalTo: '#password'
						},
						agree: {
							required: true
						}
					},
					messages: {
						user_name: {
							required: '手机号不能为空',
							byteRange: '请输入正确的手机号码',
							telphoneValid: '请输入正确的手机号码',
							usernamecheck: '请输入正确的手机号码',
							remote: '您提供的用户名已存在'
						},
						check_code: {
							required: '请输入验证码',
							digits: '验证码为数值',
							minlength: '验证码为6位'
						},
						captcha: {
							required: '不能为空',
							remote: '输入有误'
						},
						password: {
							required: '您必须提供一个密码',
							minlength: '密码长度应在6-20个字符之间'
						},
						password_confirm: {
							required: '您必须再次确认您的密码',
							equalTo: '两次输入的密码不一致'
						},
						agree: {
							required: '您必须阅读并同意该协议,否则无法注册'
						}
					}
				});

				$('#getcheckbtn').click(
					function() {
						var captcha = $("#captcha1").val();
						if(captcha == "") {
							alert("请先填写图形验证码!");
							$("#captcha1").focus();
							return;
						}
						sendSms($('#user_name'), $("#getcheckbtn"), 1, captcha);
					}
				);
			});
		</script>
		<script type="text/javascript">
			$(function() {
				poshytip_message($('#user_name'));
				poshytip_message($('#password'));
				poshytip_message($('#password_confirm'));
				poshytip_message($('#check_code'));
				poshytip_message($('#captcha1'));
			});
		</script>
		<style>
			.w {
				width: 990px;
			}
		</style>
		<div id="main" class="w-full">
			<div id="page-register" class="w login-register mt20 mb20">

				<div class="w clearfix">

					<div class="col-sub" >
						<div class="form" >
							<div class="title">用户注册</div>
							<div class="content">
								<form name="" id="register_form" method="post" action="<%=path%>/rest/user/register">
									<dl class="clearfix">
										<dt>用户名</dt>
										<dd>
											<input type="text" style="width:245px;height:26px;" id="user_name" class="input" name="uName" title="请输入注册用户名" />
											<br /><label></label>
										</dd>
									</dl>
									<dl class="clearfix">
										<dt>手机号码</dt>
										<dd>
											<input type="text" style="width:245px;height:26px;" id="user_tell" class="input" name="uTell" title="请输入手机号" />
											<br /><label></label>
										</dd>
									</dl>
								<!--<dl class="clearfix">
										<dt>验证短信</dt>
										<dd>
											<input name="check_code" type="text" class="input width_short" id="check_code" style="width:80px;height:26px;margin-right:6px;" title="手机短信验证码" size="6" maxlength="6" />
											<input type="button" style="height:30px;border:solid 1px #666;" id="getcheckbtn" value="免费获取验证码" />
											<br /><label>正确的短信验证码将作为您默认的支付密码!</label>
										</dd>
									</dl>
									<dl class="clearfix" style="margin-top:5px;">
										<dt>图形验证</dt>
										<dd class="captcha clearfix">
											<dd class="captcha clearfix">
												<input type="text" class="input float-left" name="captcha" id="captcha1" title="请输入验证码，不区分大小写" style="width:50px" />
												<img height="26" id="captcha" src="<%=basePath%>/mallstyle/picture/index.php" class="float-left" />
												<a href="javascript:change_captcha($('#captcha'));" class="float-left" style="width:40px;">看不清</a>
												<div class="clr"></div><label></label>
											</dd>
									</dl>-->
									<dl class="clearfix">
										<dt>密&nbsp;&nbsp;&nbsp;码</dt>
										<dd>
											<input class="input" type="password" id="password" name="uPassword" title="长度在6-20个字符之间,由字母、数字和标点符号组成" maxlength="20" />
											<div class="clr"></div><label></label><br />
										</dd>
									</dl>
									<dl class="clearfix">
										<dt>确认密码</dt>
										<dd>
											<input class="input" type="password" id="password_confirm" name="password_confirm" title="请再次输入你的密码" maxlength="20" />
											<div class="clr"></div><label></label>
										</dd>
									</dl>
									<dl class="clearfix">
										<dt>&nbsp;</dt>
										<dd class="mall-eula">
											<h4>如果您是本站用户</h4>
											<div class="login-field">
												<span>我已经注册过帐号，立即<a href="index.php?app=member&act=login" class="login-field-btn">请登录</a></span>
												<span>或者 <a href="index.php?app=find_password" class="find-password">找回密码</a></span>
											</div>
										</dd>
									</dl>
									<dl class="clearfix">
										<dt>&nbsp;</dt>
										<dd>
											<input type="submit" name="Submit" value="立即注册" class="register-submit" title="立即注册" />
											<input type="hidden" name="ret_url" value="http%3A%2F%2Fwww.999000.cn%2Findex.php" />
										</dd>
									</dl>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

	</body>

</html>